﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using ServiceWeb.APIRequest;
using System;
using System.Security.Claims;

namespace GatewayServer.Controllers.API.Mobile
{
    [Authorize()]
    [Route("api/mobile/[controller]/[action]")]
    public class testController : ControllerBase
    {


        public string aa()
        {
            var claims = User.Claims.ToList();
            //  new ServiceDeviceControl().sendDeviceCommand("FF680898-795E-4555-BD75-EE638BAE20BE", "collect", "移动端 -指令发送");
            return JsonConvert.SerializeObject(from c in User.Claims select new { c.Type, c.Value });
        }

    }
}
